﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MgSoft.Import.Exchange.ExWebApi.Db
{
    public abstract class DbExchangeDto : IDbExchangeDto, IExchangeDto
    {
        private string billType;

        private string billTypeName;

        /// <summary>
        /// 返回Dto的主键字段，用于判断数据是否重复
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public abstract string GetDto_KeyFieldValue();

        /// <summary>
        /// 返回Dto的业务日期，如果Dto没有业务日期，返回null
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public virtual DateTime? GetDto_DateValue() => null;

        /// <summary>
        /// 返回Dto的级织编码，用于数据组织隔离
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public virtual string GetDto_OrgNumberValue() => "";

        /// <summary>
        /// 返回Dto的更新字段，当数据存在时，如果Dto的值与UpdateField的值不一致时，认为数据更新了
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public virtual string GetDto_UpdateFieldValue() => "";

        public void SetDto_BillType(string billType)
        {
            this.billType = billType;
        }

        public void SetDto_BillTypeName(string billTypeName)
        {
            this.billTypeName = billTypeName;
        }

        public string GetDto_BillType()
        {
            return this.billType;
        }

        public string GetDto_BillTypeName()
        {
            return this.billTypeName;
        }
    }
}
